#ifndef MQTTCLIENT_H
#define MQTTCLIENT_H

#include <QObject>
#include <common.h>
#include <stdint.h>
#include <cstdlib>
#include <iostream>
#include <string>
#include <cstring>

class MqttClient : public QObject
{
    Q_OBJECT

protected:
    std::string m_address;  //("tcp://localhost:1883");
    std::string m_clientId; //CLIENTID("SyncPublisher");
    std::string m_topic;    //TOPIC("hello");

    publish::QOS m_QOS;
    uint64_t m_TIMEOUT;

public:
    MqttClient();

    void setAdress(const std::string& addr) { m_address = addr;}
    void setClientId(const std::string& clnt) { m_clientId = clnt;}
    void setTopic(const std::string& topic) { m_topic = topic;}
    void setQOS(publish::QOS qos) { m_QOS = qos;}
    void setTimeOut(uint64_t time) { m_TIMEOUT= time;}

    std::string getTopic() { return m_topic;}
    uint32_t getQOS() { return m_QOS;}

    virtual bool activate() {return false;}
    virtual bool deactivate() {return false;}


};

#endif // MANAGER_H
